package com.mozmob.visa;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;

public class VisaNotification {

	public static void notify(Context context, String city, String date, int waitTime, int notifyID) {
		NotificationManager notificationManager = (NotificationManager) context
				.getSystemService(Context.NOTIFICATION_SERVICE);

		int icon = R.drawable.ic_stat_notify_flag_usa;
		CharSequence tickerText = context.getResources().getString(R.string.application_name);
		long now = System.currentTimeMillis();

		Notification notification = new Notification(icon, tickerText, now);
//		notification.defaults = Notification.DEFAULT_SOUND;
		
		CharSequence contentTitle = tickerText + " - " + city;
		CharSequence contentText = date;
		Intent notificationIntent = new Intent(context, VisaVaga.class);
		PendingIntent contentIntent = PendingIntent.getActivity(context, 0, notificationIntent, 0);

		notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent);		
		notificationManager.notify(notifyID, notification);
	}
}
